package com.mt.repair.entity.repairManagement;

import javax.persistence.*;
import java.io.Serializable;
import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.ser.std.DateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@DEntity(label="设备",comment="",moduleLabel="报修管理")
@Entity(name="repair_device")
@Table(name = "repair_device" , indexes = { @Index(name = "index_type", columnList = "type"),@Index(name = "index_manufacturer", columnList = "manufacturer"),@Index(name = "index_use_organization", columnList = "use_organization"),@Index(name = "index_area", columnList = "area")  })
@ApiModel(description = "设备:")
public class Device extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="设备编号",comment="设备编号",component="文本",where=true)
	@ApiModelProperty(value = "设备编号:设备编号")
	@Column(name="device_code",length=255,nullable=false,unique=false)
	private String deviceCode;

	@DColumn(index=4,label="设备型号",comment="型号",component="文本",where=true)
	@ApiModelProperty(value = "设备型号:型号")
	@Column(name="model",length=255,nullable=false,unique=false)
	private String model;

	@DColumn(index=5,label="设备类型",codeTable="设备类型",codeTableOptions="空调,水龙头,门,浴霸,其他",comment="设备类型（空调、门之类）",component="字典下拉单选",where=true)
	@ApiModelProperty(value = "设备类型:设备类型（空调、门之类）")
	@Column(name="type",length=255,nullable=false,unique=false)
	private String type;

	@DColumn(index=6,label="购入日期",comment="购入日期",component="日期选择",where=false)
	@ApiModelProperty(value = "购入日期:购入日期")
	@Column(name="purchase_date",length=255,nullable=true,unique=false)
	@JsonSerialize(using = DateSerializer.class)
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date purchaseDate;

	@DColumn(index=7,label="使用日期",comment="使用日期",component="日期选择",where=false)
	@ApiModelProperty(value = "使用日期:使用日期")
	@Column(name="use_date",length=255,nullable=true,unique=false)
	@JsonSerialize(using = DateSerializer.class)
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date useDate;

	@DColumn(index=8,label="制造单位",codeTable="制造单位",codeTableOptions="格力,海尔,公牛,小米,其他",comment="制造单位",component="字典下拉单选",where=true)
	@ApiModelProperty(value = "制造单位:制造单位")
	@Column(name="manufacturer",length=255,nullable=true,unique=false)
	private String manufacturer;

	@DColumn(index=9,label="使用单位",codeTable="使用单位",codeTableOptions="重庆理工大学,其他",comment="使用单位",component="字典下拉单选",where=true)
	@ApiModelProperty(value = "使用单位:使用单位")
	@Column(name="use_organization",length=255,nullable=true,unique=false)
	private String useOrganization;

	@DColumn(index=10,label="设备位置",comment="设备位置",component="文本",where=true)
	@ApiModelProperty(value = "设备位置:设备位置")
	@Column(name="location",length=255,nullable=false,unique=false)
	private String location;

	@DColumn(index=11,label="设备区域",codeTable="设备区域",codeTableOptions="教学区,寝室,其他",comment="设备区域",component="字典下拉单选",where=false)
	@ApiModelProperty(value = "设备区域:设备区域")
	@Column(name="area",length=255,nullable=true,unique=false)
	private String area;

	@DColumn(index=12,label="设备图片",comment="设备图片",component="文本",where=false)
	@ApiModelProperty(value = "设备图片:设备图片")
	@Column(name="img",length=255,nullable=true,unique=false)
	private String img;

	@DColumn(index=13,label="二维码",comment="二维码",component="文本",where=false)
	@ApiModelProperty(value = "二维码:二维码")
	@Column(name="qr_code",length=255,nullable=true,unique=false)
	private String qrCode;


	public String getDeviceCode() {
		return this.deviceCode;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}

	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getPurchaseDate() {
		return this.purchaseDate;
	}

	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}

	public Date getUseDate() {
		return this.useDate;
	}

	public void setUseDate(Date useDate) {
		this.useDate = useDate;
	}

	public String getManufacturer() {
		return this.manufacturer;
	}

	public void setManufacturer(String manufacturer) {
		this.manufacturer = manufacturer;
	}

	public String getUseOrganization() {
		return this.useOrganization;
	}

	public void setUseOrganization(String useOrganization) {
		this.useOrganization = useOrganization;
	}

	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getArea() {
		return this.area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getImg() {
		return this.img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getQrCode() {
		return this.qrCode;
	}

	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}



}
